home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000083_icon-group-sender _Mon Apr 15 15:14:48 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 15 Apr 1996 12:26:50 MST
  2. Message-Id: <317259D8.4A6B@tees.ac.uk>
  3. Date: Mon, 15 Apr 1996 15:14:48 +0100
  4. From: Hamish Lawson <H.Lawson@tees.ac.uk>
  5. Organization: University of Teesside, School of Computing and Maths
  6. X-Mailer: Mozilla 2.01Gold (Win95; I)
  7. Mime-Version: 1.0
  8. To: icon-group@cs.arizona.edu
  9. Cc: Making@tees.ac.uk, a@tees.ac.uk, list@tees.ac.uk, out@tees.ac.uk,
  10.         of@tees.ac.uk, a@tees.ac.uk, generated@tees.ac.uk, sequence@tees.ac.uk
  11. Subject: Assigning 
  12. References: <9604112355.AA11976@boar.cs.utsa.edu>
  13. Content-Type: text/plain; charset=us-ascii
  14. Content-Transfer-Encoding: 7bit
  15. Errors-To: icon-group-errors@cs.arizona.edu
  16. Status: O
  17.  
  18. Is there an easy way to make a list out of a generated sequence? I tried 
  19. enclosing the generator sequence in square brackets, as below, but it 
  20. doesn't appear to work.
  21.  
  22.    every write(sort([!"string"]))
  23.  
  24. Am I obliged to write a loop that appends each item of the generated 
  25. sequence to a list?:
  26.  
  27.    tempList := list()
  28.    every tempList |||:= [!"string"]
  29.    every write(!sort(tempList))
  30.  
  31. If so, it would seem to me to be a curious lack of symmetry that the 
  32. language provides the ! operator to generate elements of a list, but no 
  33. corresponding convenient mechanism for collecting into a list a 
  34. generated sequence of values.
  35.  
  36. | Hamish Lawson, School of Computing and Mathematics, 
  37. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  38. | Tel: +44 1642 212695  Fax: +44 1642 342604
  39. | E-mail: H.Lawson@tees.ac.uk
  40.